package ldz.Manager;

import java.util.Objects;

public class Manager {
    private static String mno; // 对应数据库中的Mno字段
    private static String mname; // 对应数据库中的Mname字段
    private static String mpassword; // 对应数据库中的Mpassword字段

    // 生成必要的构造函数、Getter和Setter方法

    public Manager() {
    }

    public Manager(String mno, String mname, String mpassword) {
        this.mno = mno;
        this.mname = mname;
        this.mpassword = mpassword;
    }

    public static String getMno() {
        return mno;
    }

    public void setMno(String mno) {
        this.mno = mno;
    }

    public static String getMname() {
        return mname;
    }

    public void setMname(String mname) {
        this.mname = mname;
    }

    public static String getMpassword() {
        return mpassword;
    }

    public void setMpassword(String mpassword) {
        this.mpassword = mpassword;
    }

    // 重写equals和hashCode方法，便于比较对象是否相等（基于mno字段判断）
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass()!= o.getClass()) return false;
        Manager manager = (Manager) o;
        return Objects.equals(mno, manager.mno);
    }

    @Override
    public int hashCode() {
        return Objects.hash(mno);
    }
}